Ext.define('CDR.view.TariffAMQ', {
	extend: 'Ext.Panel',
	alias: 'widget.tariff-amq',
	destination: "topic://WEB.TOPIC",
	requires: ['Ext.grid.PagingScroller'],
	initComponent: function(){
		var me = this;
		me.callParent(arguments);
		me.initAmq();
	},
	
	initAmq: function() {
		var me = this;
		if(CDRUtils.amq && me.myId && me.destination){
			console.log("init amq listners", CDRUtils.amq, me.myId , me.destination);
			CDRUtils.amq.addListener(me.myId, me.destination, me.handleMessage, me.getAMQSelector());
		}
	},
	
	handleMessage: function(message){
		console.log("receive>>: " + message);
	},
	
	getAMQSelector: function(){
		return {};
	}
});